/*
 *  Filename:      gsl.h
 *  Author:         Erick Huang<erickhuang1989@gmail.com>
 *  Revised:       2013-06-04
 *  Description:   Global Services Layer.  
 *                      Some functions depend on the operating system .
 *
 *  Copyright (c) Erick Huang. All rights reserved.
 */

#ifndef GSL_H
#define GSL_H

#ifdef __cplusplus
extern "C" {
#endif  /*__cplusplus*/

#include <limits.h>
#include "gsl_defs.h"
#include "gsl_memory.h"
#include "gsl_string.h"
#include "gsl_debug.h"

// Macros
#if ( UINT_MAX == 65535 ) /* 8-bit and 16-bit devices */
  #define gsl_offsetof(type, member) ((UINT16) &(((type *) 0)->member))
#else /* 32-bit devices */
  #define gsl_offsetof(type, member) ((UINT32) &(((type *) 0)->member))
#endif	





#ifdef __cplusplus
}
#endif  /*__cplusplus*/

#endif  /* GSL_H */